//
//  FindHotTableViewCell.m
//  HJZWeiBo
//
//  Created by lanou on 16/5/31.
//  Copyright © 2016年 蒋晨成. All rights reserved.
//

#import "FindHotTableViewCell.h"

@implementation FindHotTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.userImageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 30, 30)];
        self.userImageView.layer.cornerRadius = 15;
        [self.contentView addSubview:_userImageView];
        
        self.userName = [[UILabel alloc]initWithFrame:CGRectMake(50, 10, kWidth / 2, 20)];
        self.userName.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_userName];
        
        self.time = [[UILabel alloc]initWithFrame:CGRectMake(50, 30, 50, 15)];
        self.time.font = [UIFont systemFontOfSize:13];
        self.time.textColor = [UIColor grayColor];
        [self.contentView addSubview:_time];
        
        self.location = [[UILabel alloc]initWithFrame:CGRectMake(self.time.frame.origin.x + self.time.frame.size.width + 10, self.time.frame.origin.y, kWidth / 2, 15)];
        self.location.font = [UIFont systemFontOfSize:13];
        self.location.textColor = [UIColor grayColor];
        [self.contentView addSubview:_location];
        
        self.text = [[UILabel alloc]initWithFrame:CGRectMake(10, 45, kWidth - 20, 50)];
        self.text.font = [UIFont systemFontOfSize:15];
        self.text.numberOfLines = 0;
        [self.contentView addSubview:_text];
        
        
        
    }
    return self;
}

- (void)setUserModel:(User *)userModel{
    _userModel = userModel;
    self.userName.text = _userModel.name;
    
    
}

- (void)setStatusModel:(Status *)statusModel{
    _statusModel = statusModel;
    self.time.text = _statusModel.created_at;
    
}

@end
